# coding=utf-8

import UserDict

class MenuClass(UserDict.UserDict):
    def update(self, dict=None, **kwargs):
        if dict is None:
            pass
        else:
            for k, v in dict.items():
                self[k] = v
        if len(kwargs):
            pass

    def __setitem__(self, key, item):
        self.data[key] = item
        setattr(self, str(key), item)

    def __getitem__(self, key):
        if key in self.data:
            return self.data[key]
        if hasattr(self.__class__, "__missing__"):
            return self.__class__.__missing__(self, key)
        try:
            if int(key) in self.data:
                return self.__class__.__missing__(self, int(key))
        except ValueError:
            pass
        raise KeyError(key)


Menu = ['Notes',
        'Settings']


